package com.lmind.gps.t;

public class RmiServerImpl implements RmiServer {
	
	private RmiCallback callback;

	@Override
	public void noReturn(String name) {
		System.out.println("RmiServerImpl.noReturn");
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	@Override
	public String hasReturn(String name) {
		System.out.println("RmiServerImpl.hasReturn");
		try {
			Thread.sleep(2000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return name;
	}

	@Override
	public void callback(String name) {
		callback.call(name);
	}

	@Override
	public void addCallback(RmiCallback callback) {
		this.callback = callback;
	}

}
